Prevent PHP Notice: "Uninitialized string offset: 0 in includes/Linker.php on line...
authorNick Jenkins <nickj@users.mediawiki.org>
Tue, 14 Nov 2006 07:21:40 +0000 (07:21 +0000)
committerNick Jenkins <nickj@users.mediawiki.org>
Tue, 14 Nov 2006 07:21:40 +0000 (07:21 +0000)
includes/Linker.php

index 84fe82b..9bebea2 100644 (file)
@@ -951,7 +951,7 @@ class Linker {
                                        $trail = "";
                                }
                                $linkRegexp = '/\[\[(.*?)\]\]' . preg_quote( $trail, '/' ) . '/';
-                               if ($match[1][0] == ':')
+                               if (isset($match[1][0]) && $match[1][0] == ':')
                                        $match[1] = substr($match[1], 1);
                                $thelink = $this->makeLink( $match[1], $text, "", $trail );
                        }